package item15;

import java.io.File;
import java.io.IOException;

public class FileTest {

	public static void main(String[] args) {
		File file = new File("word.txt");
		if (file.exists()) {
			// file.delete();
			System.out.println(file.length() + file.getName());
			System.out.println("word create");
			System.out.println("word delete");
		} else {
			try {
				file.createNewFile();
				System.out.println(file.length() + file.getName());
				System.out.println("word create");
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

}
